<?php

header('Content-type: application/json');
header('Access-Control-Allow-Origin: *');

include 'apiauth.php';
include 'scrape.php';
include 'database.php';

function _json_encode($data) {
	$data = json_encode($data);
	if (isset($_GET['callback'])) $data = $_GET['callback'] .'('. $data .')';
	return $data;
}